﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace _0812045
{
    public class BackgroundSprite : BaseSprite
    {
        public override void Update(GameTime theGameTime, Vector2 theSpeed, Vector2 theDirection)
        {
            x += theDirection.X * theSpeed.X * 0.005f;
            y += theDirection.Y * theSpeed.Y * 0.005f;
            base.Update(theGameTime, theSpeed, theDirection);
        }

        public override void Draw(GameTime gameTime, SpriteBatch theSpriteBatch)
        {
            theSpriteBatch.Draw(_texture2d[_itexture2d], new Vector2(x, y), new Rectangle(0, 0, _texture2d[_itexture2d].Width, _texture2d[_itexture2d].Height), Color.White, 0.0f, Vector2.Zero, Scale, SpriteEffects.None, 0);
            base.Draw(gameTime, theSpriteBatch);
        }
    }
}
